﻿Public Class FrmRegistrarclientenatural

    Private Sub Btnregistrar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnregistrar.Click
        'Dim myclientenatural As New PersonaNatural
        'myclientenatural.Codigo = Txtcodigo.Text
        'myclientenatural.Nombre = Txtclientenatural.Text
        'myclientenatural.Direccion = txtdireccion.Text
        'myclientenatural.Dni = txtDni.Text
        'myclientenatural.NombreContactoPersona = txtContacto.Text
        'myclientenatural.Telefono = Txttelefono.Text

        'CType(Me.MdiParent, frmContenedor).ListaclientenaturalTotales.AddFirst(myclientenatural)
        'MsgBox("SE REGISTRO AL CLIENTE DE FORMA EXITOSA")

        'Me.Hide()

        Try

            Dim myconeccion As New Conexion
            myconeccion.conectar()
            Dim consulta As String

            consulta = "insert into CLIENTE_NATURAL values ('" + Txtclientenatural.Text + "','" + txtdireccion.Text + "','" + Txttelefono.Text + "','" + txtDni.Text + "','" + txtContacto.Text + "')"
            myconeccion.consulta(consulta)
        Catch ex As Exception
            MsgBox(ex)

        End Try
         End Sub
End Class